﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WxCore.Sqlsugar
{
    //此写法从Admin.Net学习拷贝
    /// <summary>
    /// 
    /// </summary>
    public static class SqlSugarSetup
    {
        /// <summary>
        /// Sqlsugar上下文初始化
        /// </summary>
        public static void AddSqlSugarSetup(this IServiceCollection services, IConfiguration configuration)
        {
            DbSetting.ConnectionString = "Data Source=localhost;Database=dt_avi;User ID=root;Password=dtroot;pooling=true;port=3306;sslmode=none;CharSet=utf8;";
            DbSetting.DbType = "mysql";
        }
    }
}
